Problem: Compute
\[\begin{vmatrix} 1 & \cos (a - b) & \cos a \\ \cos(a - b) & 1 & \cos b \\ \cos a & \cos b & 1 \end{vmatrix}.\]
Answer: We can expand the determinant as follows:
\begin{align*}
\begin{vmatrix} 1 & \cos (a - b) & \cos a \\ \cos(a - b) & 1 & \cos b \\ \cos a & \cos b & 1 \end{vmatrix} &= \begin{vmatrix} 1 & \cos b \\ \cos b & 1 \end{vmatrix} - \cos (a - b) \begin{vmatrix} \cos (a - b) & \cos b \\ \cos a  & 1 \end{vmatrix} + \cos a \begin{vmatrix} \cos (a - b) & 1 \\ \cos a  & \cos b \end{vmatrix} \\
&= (1 - \cos^2 b) - \cos (a - b)(\cos (a - b) - \cos a \cos b) + \cos a (\cos (a - b) \cos b - \cos a) \\
&= 1 - \cos^2 b - \cos^2 (a - b) + \cos a \cos b \cos(a - b) + \cos a \cos b \cos (a - b) - \cos^2 a \\
&= 1 - \cos^2 a - \cos^2 b - \cos^2 (a - b) + 2 \cos a \cos b \cos(a - b).
\end{align*}We can write
\begin{align*}
2 \cos a \cos b \cos (a - b) - \cos^2 (a - b) &= \cos (a - b) (2 \cos a \cos b - \cos (a - b)) \\
&= \cos (a - b) (\cos a \cos b - \sin a \sin b) \\
&= \cos (a - b) \cos (a + b) \\
&= \frac{1}{2} (\cos 2a + \cos 2b) \\
&= \cos^2 a - \frac{1}{2} + \cos^2 b - \frac{1}{2} \\
&= \cos^2 a + \cos^2 b - 1.
\end{align*}Therefore, the determinant is equal to $\boxed{0}.$